﻿<!--#include file="../../base.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查看并修改用户信息</title>
<link href="../../skin/default/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
dim contid,sql,rs,nowDate,ident
nowDate=now()
contid=request.QueryString("workid")
ident=request.QueryString("ident")
if not IsLogin() and contid="" then
    showMsg "您无权查看此信息",4,""
else
%>       
<table align="center" width="95%" cellpadding="0" cellspacing="0" style="margin-top:10px; border:1px solid #333333;">
<%
sql="select * from work where workID="&contid&" and [delete]=0"
set rs=GetRecordset(sql,0)
if not rs.eof or not rs.bof then
%>
<tr>
<td style="padding:6px; height: 31px;border:1px solid #333333;"><b>开始日期</b>&nbsp;&nbsp;<%=rs("startDate")%></td>
<td style="padding:6px; height: 31px;border:1px solid #333333;"><b>结束日期</b>&nbsp;&nbsp;<%=rs("stopDate")%></td>
</tr>
<tr>
<td colspan="2" style="padding:6px; height: 31px;border:1px solid #333333;"><b>作业标题</b>&nbsp;&nbsp;<%=rs("title")%></td>
</tr>
<tr>
<td colspan="2" style="padding:6px;border:1px solid #333333;"><b>作业内容</b><br /><%=rs("content")%></td>
</tr>
<tr>
<td style="padding:6px;border:1px solid #333333;"><b>作业状态</b>&nbsp;&nbsp;
<%
if datediff("d",rs("startDate"),nowDate)>=0 and datediff("d",rs("stopDate"),nowDate)<=0 then
    response.Write("可以提交")
else
    response.Write("已关闭提交")
end if
%>
<td style="padding:6px;border:1px solid #333333;"><b>相关操作</b>&nbsp;&nbsp;
<%
if ident="0" then
    response.Write("<a href='list_workpost.aspx?workid="&contid&"'>批改作业</a>")
else
    if ident="1" and datediff("d",rs("startDate"),nowDate)>=0 and datediff("d",rs("stopDate"),nowDate)<=0 then
        response.Write("<a href='../editor_workpost.asp?workid="&contid&"'>提交作业</a>")
    end if
end if
else showMsg "作业不存在",4,""
end if
rs.close
set rs=nothing
CloseDataBase
%>
</td>
</tr>
</table>
<%end if%>
</body>
</html>